<?php

namespace app\commands;

use Yii;
use yii\console\Controller;
use yii\web\NotFoundHttpException;
use app\modules\Order\models\OrderCustomer;
//use TesseractOCR\TesseractOCR;

class CustomerController extends Controller
{

	/**
	 * 更新原填写客户信息完整性判断
	 * @param combination  
	 */
	public function actionIndex(){//{{{
		$models = OrderCustomer::find()->all();
	
		foreach($models as $model){
			
		if($model->first_name && $model->last_name && $model->en_first_name && $model->en_last_name && $model->pinyin && 
			$model->gender && $model->birthday && $model->country && $model->passport && $model->passport_add && 
			$model->passport_grant && $model->passport_date && $model->passport_type && $model->passport_img && $model->native ){

				$model->complete = 1;
				$model->save();
		}


		}

		

        
	}//}}}


}
